-
Stephen A. Wood authored
TClonesArray ConstructedAt method. Raw hit class for drift chambers and skeleton drift chamber that prints out drift chamber package hits. Move Compare method from THcHodoscopeHit to ThcRawHit since it should work for any derived class. Get detector name -> ID mapping from the map file comments
Stephen A. Wood authoredTClonesArray ConstructedAt method. Raw hit class for drift chambers and skeleton drift chamber that prints out drift chamber package hits. Move Compare method from THcHodoscopeHit to ThcRawHit since it should work for any derived class. Get detector name -> ID mapping from the map file comments
THcDetectorMap.h 1.27 KiB
#ifndef ROOT_THcDetectorMap
#define ROOT_THcDetectorMap
//////////////////////////////////////////////////////////////////////////
//
// THcDetectorMap
//
//////////////////////////////////////////////////////////////////////////
#include "TObject.h"
#include "THaDetMap.h"
#include <list>
class THcDetectorMap : public TObject {
public:
THcDetectorMap();
virtual ~THcDetectorMap();
virtual void Load(const char *fname);
virtual Int_t FillMap(THaDetMap* detmap, const char* detectorname);
Int_t fNchans; // Number of hardware channels
struct Channel { // Mapping for one hardware channel
Int_t roc;
Int_t slot;
Int_t channel;
Int_t did;
Int_t plane;
Int_t counter;
Int_t signal;
Int_t model;
};
Channel fTable[10000]; // Big ugly cache of the map file
struct ChaninMod {
Int_t channel;
Int_t plane;
Int_t counter;
Int_t signal;
};
struct ModChanList {
Int_t roc;
Int_t slot;
Int_t model;
std::list<ChaninMod> clist;
};
std::list<ModChanList> mlist;
struct IDMap {
char* name;
Int_t id;
};
IDMap fIDMap[50];
Int_t fNIDs; /* Number of detector IDs */
bool compare(const ChaninMod *first, const ChaninMod *second);
protected:
ClassDef(THcDetectorMap,0);
};
#endif