CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ApvAnalysisFactory.h
Go to the documentation of this file.
1 #ifndef ApvAnalysisFactory_h
2 #define ApvAnalysisFactory_h
3 //#define DEBUG_INSTANCE_COUNTING
4 
5 
17 #include <vector>
18 #include <iostream>
19 #include<map>
20 #include<algorithm>
21 #include<string>
22 
23 
24 
26 {
27  public:
28  typedef std::vector<ApvAnalysis *> ApvAnalysisVector;
29 
30  ApvAnalysisFactory(std::string theAlgorithmType,
31  int theNumCMstripsInGroup,
32  int theMaskCalcFlag,
33  float theMaskNoiseCut,
34  float theMaskDeadCut,
35  float theMaskTruncCut,
36  float theCutToAvoidSignal,
37  int theEventInitNumber,
38  int theEventIterNumber);
41 
42  bool instantiateApvs(uint32_t det_id, int numberOfApvs);
43 
44  ApvAnalysisVector getApvAnalysis( const uint32_t nDET_ID);
45 
46  void getPedestal(uint32_t det_id , int apvNumber, ApvAnalysis::PedestalType& peds);
47  void getPedestal(uint32_t det_id , ApvAnalysis::PedestalType& peds);
48  float getStripPedestal(uint32_t det_id, int stripNumber);
49 
50  void getMask(uint32_t det_id, TkApvMask::MaskType& tmp);
51  void getCommonMode(uint32_t det_id, ApvAnalysis::PedestalType& tmp);
52  std::vector<float> getCommonMode(uint32_t det_id, int apvNumber);
53 
54  void getNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType& noise);
55  void getNoise(uint32_t det_id, ApvAnalysis::PedestalType& noise);
56  float getStripNoise(uint32_t det_id, int stripNumber);
57 
58  void getRawNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType& noise);
59  void getRawNoise(uint32_t det_id, ApvAnalysis::PedestalType& noise);
60  float getStripRawNoise(uint32_t det_id, int stripNumber);
61 
62  void getCommonModeSlope(uint32_t det_id, ApvAnalysis::PedestalType& tmp);
63  float getCommonModeSlope(uint32_t det_id, int apvNumber);
64 
65  void update(uint32_t det_id, const edm::DetSet<SiStripRawDigi>& in);
66  void updatePair(uint32_t det_id, size_t apvPair, const edm::DetSet<SiStripRawDigi>& in);
67 
68  std::string getStatus(uint32_t det_id);
69 
70  bool isUpdating(uint32_t detId);
71 
72 
73  typedef std::map < uint32_t, ApvAnalysisVector> ApvAnalysisMap;
74  typedef std::map < ApvAnalysis *,int > MapNumberingPosition;
75  typedef std::map < ApvAnalysis *, uint32_t> InverseMap;
76 
77  private:
78  // void constructAuxiliaryApvClasses (ApvAnalysis* thisApv);
79  void constructAuxiliaryApvClasses (ApvAnalysis* theApv, uint32_t det_id, int thisApv);
80  void deleteApv(ApvAnalysis* apv);
92  bool useDB_;
93 
94 };
95 #endif
std::vector< StripMaskType > MaskType
Definition: TkApvMask.h:17
std::vector< float > PedestalType
Definition: ApvAnalysis.h:48
ApvAnalysisMap apvMap_
void getPedestal(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &peds)
void getCommonModeSlope(uint32_t det_id, ApvAnalysis::PedestalType &tmp)
void update(uint32_t det_id, const edm::DetSet< SiStripRawDigi > &in)
void getNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
void getMask(uint32_t det_id, TkApvMask::MaskType &tmp)
std::map< ApvAnalysis *, int > MapNumberingPosition
float getStripNoise(uint32_t det_id, int stripNumber)
std::map< uint32_t, ApvAnalysisVector > ApvAnalysisMap
void getRawNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
void deleteApv(ApvAnalysis *apv)
float getStripRawNoise(uint32_t det_id, int stripNumber)
void updatePair(uint32_t det_id, size_t apvPair, const edm::DetSet< SiStripRawDigi > &in)
bool instantiateApvs(uint32_t det_id, int numberOfApvs)
void getCommonMode(uint32_t det_id, ApvAnalysis::PedestalType &tmp)
std::string theAlgorithmType_
ApvAnalysisVector getApvAnalysis(const uint32_t nDET_ID)
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
ApvAnalysisFactory(std::string theAlgorithmType, int theNumCMstripsInGroup, int theMaskCalcFlag, float theMaskNoiseCut, float theMaskDeadCut, float theMaskTruncCut, float theCutToAvoidSignal, int theEventInitNumber, int theEventIterNumber)
void constructAuxiliaryApvClasses(ApvAnalysis *theApv, uint32_t det_id, int thisApv)
float getStripPedestal(uint32_t det_id, int stripNumber)
bool isUpdating(uint32_t detId)
std::map< ApvAnalysis *, uint32_t > InverseMap
std::vector< ApvAnalysis * > ApvAnalysisVector
std::string getStatus(uint32_t det_id)