/[PAMELA software]/PamVMC/include/PamVMCDigMgr.h
ViewVC logotype

Diff of /PamVMC/include/PamVMCDigMgr.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by nikolas, Thu Feb 19 16:50:36 2009 UTC revision 1.5 by pam-rm2, Fri Jun 12 18:39:17 2009 UTC
# Line 39  class PamVMCDigMgr: public TObject { Line 39  class PamVMCDigMgr: public TObject {
39      SetDIG("TSPA", new PamVMCTrkDig());      SetDIG("TSPA", new PamVMCTrkDig());
40      SetDIG("S4",new PamVMCS4Dig());      SetDIG("S4",new PamVMCS4Dig());
41      SetDIG("NDTI",new PamVMCNDDig());      SetDIG("NDTI",new PamVMCNDDig());
42      SetDIG("RunHeader", new PamVMCDigRunHeader());      //SetDIG("RunHeader", new PamVMCDigRunHeader());
43      SetDIG("RunTrailer", new PamVMCDigRunTrailer());      //SetDIG("RunTrailer", new PamVMCDigRunTrailer());
44    }    }
45    
46   public:   public:
# Line 53  class PamVMCDigMgr: public TObject { Line 53  class PamVMCDigMgr: public TObject {
53      return (PamVMCDigitizer*)fdigmap(name);      return (PamVMCDigitizer*)fdigmap(name);
54    }    }
55    
56      /* Setting pointer to random objects for all Digitizers */
57    /* All digitizers load calibrations and calibrate */    /* All digitizers load calibrations and calibrate */
58    void LoadCalib(){    void Initialize(TRandom* random){
59      TMapIter *n= (TMapIter *)fdigmap.MakeIterator();      TMapIter *n= (TMapIter *)fdigmap.MakeIterator();
60      TObject *o; while( o=(TObject *) n->Next()) {      TObject *o; while( (o=(TObject *) n->Next())) {
61      ((PamVMCDigitizer *)fdigmap.GetValue(o))->LoadCalib();      ((PamVMCDigitizer *)fdigmap.GetValue(o))->LoadCalib();
62        ((PamVMCDigitizer *)fdigmap.GetValue(o))->SetRandom(random);
63      }      }
64    }    }
65    
66    /* This calls digitization for all detector */    /* This calls digitization for all detector */
67    void Digitize(Int_t EventNo, Int_t PrimaryPDG){    void Digitize(Int_t EventNo, Int_t PrimaryPDG){
68      TMapIter *n= (TMapIter *)fdigmap.MakeIterator();      TMapIter *n= (TMapIter *)fdigmap.MakeIterator();
69      TObject *o; while( o=(TObject *) n->Next()) {      TObject *o; while( (o=(TObject *) n->Next())) {
70      ((PamVMCDigitizer *)fdigmap.GetValue(o))->Digitize();      ((PamVMCDigitizer *)fdigmap.GetValue(o))->Digitize();
71      }      }
72            
# Line 112  class PamVMCDigMgr: public TObject { Line 114  class PamVMCDigMgr: public TObject {
114       to raw-file only once, when run is over */       to raw-file only once, when run is over */
115    void FinishRun(){    void FinishRun(){
116      TMapIter *n= (TMapIter *)fdigmap.MakeIterator();      TMapIter *n= (TMapIter *)fdigmap.MakeIterator();
117      TObject *o; while( o=(TObject *) n->Next()) {      TObject *o; while( (o=(TObject *) n->Next())) {
118      ((PamVMCDigitizer *)fdigmap.GetValue(o))->FinishRun();      ((PamVMCDigitizer *)fdigmap.GetValue(o))->FinishRun();
119      }      }
120    }    }
# Line 121  class PamVMCDigMgr: public TObject { Line 123  class PamVMCDigMgr: public TObject {
123    
124    void PrintCollections(){    void PrintCollections(){
125      TMapIter *n= (TMapIter *)fdigmap.MakeIterator();      TMapIter *n= (TMapIter *)fdigmap.MakeIterator();
126      TObject *o; while( o=(TObject *) n->Next()) {      TObject *o; while( (o=(TObject *) n->Next())) {
127        ((PamVMCDigitizer *)fdigmap.GetValue(o))->PrintCollections();        ((PamVMCDigitizer *)fdigmap.GetValue(o))->PrintCollections();
128      }      }
129    }    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.23