Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:12:21

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef PROTOTYPE4_GENERICUNPACKPRDF_H
0004 #define PROTOTYPE4_GENERICUNPACKPRDF_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <map>
0009 #include <string>
0010 #include <utility>  // for pair
0011 
0012 class PHCompositeNode;
0013 class RawTowerContainer;
0014 
0015 class GenericUnpackPRDF : public SubsysReco
0016 {
0017  public:
0018   GenericUnpackPRDF(const std::string &detector);
0019 
0020   int InitRun(PHCompositeNode *topNode);
0021 
0022   int process_event(PHCompositeNode *topNode);
0023 
0024   void CreateNodeTree(PHCompositeNode *topNode);
0025 
0026   //! add stuff to be unpacked
0027   void add_channel(const int packet_id,  //! packet id
0028                    const int channel,    //! channel in packet
0029                    const int tower_id    //! output tower id
0030   );
0031 
0032  private:
0033   std::string _detector;
0034 
0035   //! packet_id, channel number to define a hbd_channel
0036   typedef std::pair<int, int> channel_typ;
0037 
0038   //! list of hbd_channel -> channel id which is also tower id
0039   typedef std::map<channel_typ, int> channel_map;
0040 
0041   channel_map _channel_map;
0042 
0043   // output -> Towers
0044   RawTowerContainer *_towers;
0045 };
0046 
0047 #endif