9 #ifndef QC_MODULE_ITS_ITSRAWTASK_H 10 #define QC_MODULE_ITS_ITSRAWTASK_H 15 #include <TPaveText.h> 17 #include <ITSMFTReconstruction/RawPixelReader.h> 18 #include <ITSBase/GeometryTGeo.h> 19 #include <ITSMFTReconstruction/DigitPixelReader.h> 26 o2::itsmft::Digit Digits;
32 namespace quality_control_modules
40 using ChipPixelData = o2::itsmft::ChipPixelData;
41 using PixelReader = o2::itsmft::PixelReader;
50 void initialize(o2::framework::InitContext& ctx)
override;
51 void startOfActivity(
Activity& activity)
override;
52 void startOfCycle()
override;
53 void monitorData(o2::framework::ProcessingContext& ctx)
override;
54 void endOfCycle()
override;
55 void endOfActivity(
Activity& activity)
override;
56 void reset()
override;
62 void ConfirmXAxis(TH1* h);
63 void ReverseYAxis(TH1* h);
67 void createGlobalHistos();
69 void createLayerHistos(
int aLayer);
70 void createStaveHistos(
int aLayer,
int aStave);
71 void createEtaPhiHitmap(
int aLayer);
72 void createChipStaveOcc(
int aLayer);
73 void createHicHistos(
int aLayer,
int aStave,
int aHic);
75 void addMetadata(
int runID,
int EpID,
int fileID);
76 void formatAxes(TH1* h,
const char* xTitle,
const char* yTitle,
float xOffset = 1.,
float yOffset = 1.);
77 void formatPaveText(TPaveText* aPT,
float aTextSize, Color_t aTextColor,
short aTextAlign,
const char* aText);
78 void getHicCoordinates(
int aLayer,
int aChip,
int aCol,
int aRow,
int& aHicRow,
int& aHicCol);
79 void getProcessStatus(
int aInfoFile,
int& aFileFinish);
80 void updateFile(
int aRunID,
int aEpID,
int aFileID);
82 void resetOccupancyPlots();
83 void updateOccupancyPlots(
int nEvents);
84 void addObject(
TObject* aObject,
bool published =
true);
86 void formatStatistics(TH2* h);
87 void format2DZaxis(TH2* h);
89 ChipPixelData* mChipData =
nullptr;
90 std::vector<ChipPixelData> mChips;
91 std::vector<ChipPixelData> mChipsOld;
92 o2::itsmft::PixelReader* mReader =
nullptr;
93 std::unique_ptr<o2::itsmft::DigitPixelReader> mReaderMC;
94 o2::itsmft::RawPixelReader<o2::itsmft::ChipMappingITS> mReaderRaw;
95 o2::itsmft::ChipInfo chipInfo;
96 UInt_t mCurrROF = o2::itsmft::PixelData::DummyROF;
99 static constexpr
int NCols = 1024;
100 static constexpr
int NRows = 512;
101 const int NColHis = 1024;
102 const int NRowHis = 512;
106 const int occUpdateFrequency = 1000000;
108 int mDivisionStep = 32;
109 static constexpr
int NPixels = NRows * NCols;
110 static constexpr
int NLayer = 7;
111 static constexpr
int NLayerIB = 3;
113 const int ChipBoundary[NLayer + 1] = { 0, 108, 252, 432, 3120, 6480, 14712, 24120 };
114 const int NStaves[NLayer] = { 12, 16, 20, 24, 30, 42, 48 };
115 const int nHicPerStave[NLayer] = { 1, 1, 1, 8, 8, 14, 14 };
116 const int nChipsPerHic[NLayer] = { 9, 9, 9, 14, 14, 14, 14 };
117 int mlayerEnable[NLayer] = { 0, 0, 0, 0, 0, 0, 0 };
118 const float etaCoverage[NLayer] = { 2.5, 2.3, 2.0, 1.5, 1.4, 1.4, 1.3 };
119 const double PhiMin = 0;
120 const double PhiMax = 3.284;
127 TH1D* hOccupancyPlot[NLayer];
128 TH2I* hEtaPhiHitmap[NLayer];
129 TH2D* hChipStaveOccupancy[NLayer];
130 TH2I* hHicHitmap[7][48][14];
131 TH2I* hChipHitmap[7][48][14][14];
133 const std::vector<o2::itsmft::Digit>* mDigits =
nullptr;
135 o2::its::GeometryTGeo* gm = o2::its::GeometryTGeo::Instance();
137 static constexpr
int NError = 11;
138 std::array<unsigned int, NError> mErrors;
139 std::array<unsigned int, NError> mErrorPre;
140 std::array<unsigned int, NError> mErrorPerFile;
143 TPaveText* pt[NError];
144 TPaveText* ptFileName;
147 TPaveText* bulbGreen;
149 TPaveText* bulbYellow;
151 std::vector<TObject*> m_objects;
152 std::vector<TObject*> m_publishedObjects;
154 TString ErrorType[NError] = {
"Error ID 1: ErrPageCounterDiscontinuity",
"Error ID 2: ErrRDHvsGBTHPageCnt",
155 "Error ID 3: ErrMissingGBTHeader",
"Error ID 4: ErrMissingGBTTrailer",
"Error ID 5: ErrNonZeroPageAfterStop",
156 "Error ID 6: ErrUnstoppedLanes",
"Error ID 7: ErrDataForStoppedLane",
"Error ID 8: ErrNoDataForActiveLane",
157 "Error ID 9: ErrIBChipLaneMismatch",
"Error ID 10: ErrCableDataHeadWrong",
158 "Error ID 11: Jump in RDH_packetCounter" };
159 const int NFiles = 24;
162 int mTotalDigits = 0;
169 int mTotalCounted = 10000;
177 #endif // QC_MODULE_ITS_ITSRAWTASK_H
Skeleton of a QC task.
Definition: TaskInterface.h:53
Definition: ITSRawTask.h:25
Definition: ITSRawTask.h:37
Dummy class that should be removed when there is the official one. This corresponds to a Run1/2 "run"...
Definition: Activity.h:25
These methods can be used to build a complex processing topology. It spawns 3 separate dummy processi...
Definition: Activity.h:19