Skip to content

Commit 1221df8

Browse files
committed
printout
1 parent 8a616d8 commit 1221df8

5 files changed

Lines changed: 24 additions & 40 deletions

File tree

DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/LookUpTable.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "CCDB/BasicCCDBManager.h"
2323

2424
#include <Rtypes.h>
25-
#include <bits/stdint-uintn.h>
2625
#include <cassert>
2726
#include <exception>
2827
#include <iostream>
@@ -133,18 +132,16 @@ class LookUpTable
133132

134133
int getLink(int channel) const
135134
{
136-
std::cout << " getLink for " << channel << " link " << mTopoVector[channel].mPM << std::endl;
137135
return mTopoVector[channel].mPM;
138136
}
139137
int getMCP(int channel) const
140138
{
141-
std::cout << " getLink " << channel << " mcp " << mTopoVector[channel].mMCP << std::endl;
142139
return mTopoVector[channel].mMCP;
143140
}
144141

145142
static o2::ft0::LookUpTable linear()
146143
{
147-
std::vector<o2::ft0::Topo> lut_data(NUMBER_OF_MCPs * NUMBER_OF_PMs - 8);
144+
std::vector<o2::ft0::Topo> lut_data(NUMBER_OF_MCPs * NUMBER_OF_PMs);
148145
for (int link = 0; link < NUMBER_OF_PMs; ++link) {
149146
for (int mcp = 0; mcp < NUMBER_OF_MCPs; ++mcp) {
150147
lut_data[link * NUMBER_OF_MCPs + mcp] = o2::ft0::Topo{link, mcp};
@@ -185,21 +182,17 @@ class LookUpTable
185182
static o2::ft0::LookUpTable readTable()
186183
{
187184

188-
std::vector<o2::ft0::Topo> lut_data; //(NUMBER_OF_MCPs * NUMBER_OF_PMs - 8);
185+
std::vector<o2::ft0::Topo> lut_data;
189186
auto& mgr = o2::ccdb::BasicCCDBManager::instance();
190187
mgr.setURL("http://ccdb-test.cern.ch:8080");
191188
auto hvch = mgr.get<std::vector<o2::ft0::HVchannel>>("FT0/LookUpTable");
192-
std::cout << hvch->size() << std::endl;
193189
size_t max = 0;
194190
for (auto const& chan : *hvch)
195191
if (max < chan.channel)
196192
max = chan.channel;
197193
lut_data.resize(max + 1);
198194
for (auto const& chan : *hvch) {
199-
/* for (int i = 0; i < hvch->size(); i++) { */
200-
/* assert(i == (*hvch)[i].channel); */
201195
o2::ft0::Topo topo = chan.pm;
202-
std::cout << int(chan.channel) << " " << topo.mPM << " mcp " << topo.mMCP << std::endl;
203196
lut_data[chan.channel] = topo;
204197
}
205198
return o2::ft0::LookUpTable{lut_data};

Detectors/FIT/FT0/base/include/FT0Base/Geometry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include <Rtypes.h>
1818
#include <TVector3.h>
19-
#include <vector>
2019

2120
namespace o2
2221
{
@@ -38,6 +37,7 @@ class Geometry
3837
///
3938
TVector3 centerMCP(int imcp) { return mMCP[imcp]; }
4039

40+
static constexpr int Nchannels = 208; // number od channels
4141
static constexpr int NCellsA = 24; // number of radiatiors on A side
4242
static constexpr int NCellsC = 28; // number of radiatiors on C side
4343
static constexpr float ZdetA = 335; // number of radiatiors on A side

Detectors/FIT/FT0/simulation/include/FT0Simulation/Detector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class Detector : public o2::base::DetImpl<Detector>
154154
int mTrackIdTop;
155155
int mTrackIdMCPtop; //TEMPORARY
156156

157-
int mSim2LUT[208];
157+
int mSim2LUT[Geometry::Nchannels];
158158

159159
ClassDefOverride(Detector, 3);
160160
};

Detectors/FIT/FT0/simulation/src/Detector.cxx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,6 @@ void Detector::ConstructGeometry()
211211
TGeoHMatrix* ph = new TGeoHMatrix(hm);
212212
stlinC->AddNode(ins, itr, ph);
213213
}
214-
for (int ic = 0; ic < 28; ic++) {
215-
std::cout << xc2[ic] << ", ";
216-
}
217-
std::cout << std::endl;
218-
for (int ic = 0; ic < 28; ic++) {
219-
std::cout << yc2[ic] << ", ";
220-
}
221-
std::cout << std::endl;
222214
TGeoVolume* alice = gGeoManager->GetVolume("barrel");
223215
alice->AddNode(stlinA, 1, new TGeoTranslation(0, 30., zdetA));
224216
TGeoRotation* rotC = new TGeoRotation("rotC", 90., 0., 90., 90., 180., 0.);
@@ -669,7 +661,7 @@ void Detector::DefineSim2LUTindex()
669661
LOG(ERROR) << "Error opening ascii file (it is probably a folder!): " << indPath.c_str();
670662
}
671663
int fromfile;
672-
for (int iind = 0; iind < 208; iind++) {
664+
for (int iind = 0; iind < Geometry::Nchannels; iind++) {
673665
infile >> fromfile;
674666
mSim2LUT[iind] = fromfile;
675667
}

Detectors/FIT/FT0/simulation/src/Digits2Raw.cxx

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ void Digits2Raw::readDigits(const std::string& outDir, const std::string& fileDi
9595
*/
9696
o2::ft0::LookUpTable lut{o2::ft0::LookUpTable::readTable()};
9797
LOG(INFO) << " ##### LookUp set ";
98-
// lut.printFullMap();
9998

10099
std::string outd = outDir;
101100
if (outd.back() != '/') {
@@ -131,7 +130,7 @@ void Digits2Raw::readDigits(const std::string& outDir, const std::string& fileDi
131130
digTree->GetEntry(ient);
132131

133132
int nbc = digitsBC.size();
134-
LOG(INFO) << "Entry " << ient << " : " << nbc << " BCs stored";
133+
LOG(DEBUG) << "Entry " << ient << " : " << nbc << " BCs stored";
135134
for (int ibc = 0; ibc < nbc; ibc++) {
136135
auto& bcd = digitsBC[ibc];
137136
intRecord = bcd.getIntRecord();
@@ -158,7 +157,7 @@ void Digits2Raw::convertDigits(o2::ft0::Digit bcdigits,
158157
if (nlink != oldlink) {
159158
if (oldlink >= 0) {
160159
uint nGBTWords = uint((nchannels + 1) / 2);
161-
LOG(INFO) << " oldlink " << oldlink << " nGBTWords " << nGBTWords;
160+
LOG(DEBUG) << " oldlink " << oldlink << " nGBTWords " << nGBTWords;
162161
if ((nchannels % 2) == 1) {
163162
mRawEventData.mEventData[nchannels] = {};
164163
}
@@ -171,15 +170,15 @@ void Digits2Raw::convertDigits(o2::ft0::Digit bcdigits,
171170
oldlink = nlink;
172171
mRawEventData.mEventHeader = makeGBTHeader(nlink, intRecord);
173172
nchannels = 0;
174-
LOG(INFO) << " switch to new link " << nlink;
173+
LOG(DEBUG) << " switch to new link " << nlink;
175174
}
176175
auto& newData = mRawEventData.mEventData[nchannels];
177176
bool isAside = (pmchannels[ich].ChId < 96);
178177
newData.charge = pmchannels[ich].QTCAmpl;
179178
newData.time = pmchannels[ich].CFDTime;
180179
newData.generateFlags();
181180
newData.channelID = lut.getMCP(pmchannels[ich].ChId);
182-
LOG(INFO) << "packed GBT " << nlink << " channelID " << (int)newData.channelID << " charge " << newData.charge << " time " << newData.time << " chain " << int(newData.numberADC) << " size " << sizeof(newData);
181+
LOG(DEBUG) << "packed GBT " << nlink << " channelID " << (int)newData.channelID << " charge " << newData.charge << " time " << newData.time << " chain " << int(newData.numberADC) << " size " << sizeof(newData);
183182
nchannels++;
184183
}
185184
// fill mEventData[nchannels] with 0s to flag that this is a dummy data
@@ -192,7 +191,7 @@ void Digits2Raw::convertDigits(o2::ft0::Digit bcdigits,
192191
mLinkID = uint32_t(oldlink);
193192
mFeeID = uint64_t(oldlink);
194193
mWriter.addData(mFeeID, mCruID, mLinkID, mEndPointID, intRecord, datalast);
195-
LOG(INFO) << " last " << oldlink;
194+
LOG(DEBUG) << " last " << oldlink;
196195
//TCM
197196
mRawEventData.mEventHeader = makeGBTHeader(LinkTCM, intRecord); //TCM
198197
mRawEventData.mEventHeader.nGBTWords = 1;
@@ -218,20 +217,20 @@ void Digits2Raw::convertDigits(o2::ft0::Digit bcdigits,
218217
tcmdata.amplC = ampC;
219218
tcmdata.timeA = mTriggers.timeA;
220219
tcmdata.timeC = mTriggers.timeC;
221-
LOG(INFO) << " TCM triggers read "
222-
<< " time A " << mTriggers.timeA << " time C " << mTriggers.timeC
223-
<< " amp A " << ampA << " amp C " << ampC
224-
<< " N A " << int(mTriggers.nChanA) << " N C " << int(mTriggers.nChanC)
225-
<< " trig "
226-
<< " ver " << mTriggers.getVertex() << " A " << mTriggers.getOrA() << " C " << mTriggers.getOrC();
227-
228-
LOG(INFO) << "TCMdata"
229-
<< " time A " << tcmdata.timeA << " time C " << tcmdata.timeC
230-
<< " amp A " << tcmdata.amplA << " amp C " << tcmdata.amplC
231-
<< " N A " << int(tcmdata.nChanA) << " N C " << int(tcmdata.nChanC)
232-
<< " trig "
233-
<< " ver " << tcmdata.vertex << " A " << tcmdata.orA << " C " << tcmdata.orC
234-
<< " size " << sizeof(tcmdata);
220+
LOG(DEBUG) << " TCM triggers read "
221+
<< " time A " << mTriggers.timeA << " time C " << mTriggers.timeC
222+
<< " amp A " << ampA << " amp C " << ampC
223+
<< " N A " << int(mTriggers.nChanA) << " N C " << int(mTriggers.nChanC)
224+
<< " trig "
225+
<< " ver " << mTriggers.getVertex() << " A " << mTriggers.getOrA() << " C " << mTriggers.getOrC();
226+
227+
LOG(DEBUG) << "TCMdata"
228+
<< " time A " << tcmdata.timeA << " time C " << tcmdata.timeC
229+
<< " amp A " << tcmdata.amplA << " amp C " << tcmdata.amplC
230+
<< " N A " << int(tcmdata.nChanA) << " N C " << int(tcmdata.nChanC)
231+
<< " trig "
232+
<< " ver " << tcmdata.vertex << " A " << tcmdata.orA << " C " << tcmdata.orC
233+
<< " size " << sizeof(tcmdata);
235234

236235
auto data = mRawEventData.to_vector(1);
237236
mLinkID = uint32_t(LinkTCM);

0 commit comments

Comments
 (0)