Int_t\r
AliHLTEMCALRawHistoMaker::MakeHisto(AliHLTCaloChannelDataHeaderStruct* channelDataHeader,\r
const AliHLTComponentBlockData* iter, AliHLTUInt8_t* outputPtr,\r
- const AliHLTUInt32_t size)\r
+ const AliHLTUInt32_t size, int beverbose)\r
{\r
- int tmpsize= 0;\r
+ //int tmpsize = 0;\r
Int_t crazyness = 0;\r
Int_t nSamples = 0;\r
Short_t channelCount = 0;\r
\r
fRawCounterMemoryPtr->SetMemory( reinterpret_cast<UChar_t*>( iter->fPtr ), static_cast<ULong_t>( iter->fSize ) );\r
fRawCounterMemoryPtr->SetEquipmentID( fMapperPtr->GetDDLFromSpec( iter->fSpecification) + fCaloConstants->GetDDLOFFSET() );\r
-\r
fRawCounterMemoryPtr->Reset();\r
\r
//fRawCounterMemoryPtr->NextEvent();\r
\r
UInt_t eventType = fRawCounterMemoryPtr->GetType();\r
\r
- //cout << "event type: " << eventType << endl;\r
+ if (beverbose)\r
+ cout << "I-RAWHISTOMAKER: event type: " << eventType << endl;\r
\r
// if (eventType != AliRawEventHeaderBase::kPhysicsEvent) continue;\r
\r
fRawHistoMakerPtr(0),
fPushFraction(10),
fLocalEventCount(0),
- fRootFileName("histo_local_dump.root")
+ fRootFileName("histofile_local.root"),
+ fBeVerbose(0)
{
//see header file for documentation
}
AliHLTEMCALRawHistoMakerComponent::GetComponentID()
{
//see header file for documentation
- return "EMCALRawHistoMaker";
+ return "EmcalRawHistoMaker";
}
UInt_t specification = 0;
AliHLTCaloChannelDataHeaderStruct* tmpChannelData = 0;
+
for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
{
iter = blocks+ndx;
- //cout << " into do event and into to for loop !!! " << endl;
- //PrintComponentDataTypeInfo(iter->fDataType);
+
+ if (fBeVerbose) {
+ PrintComponentDataTypeInfo(iter->fDataType);
+ cout << "I-RAWHISTOMAKERCOMPONENT: verbose mode enabled: " << fBeVerbose << endl;
+ }
if(iter->fDataType != AliHLTEMCALDefinitions::fgkChannelDataType)
{
- HLTDebug("Data block is not of type fgkChannelDataType");
+
+ if (fBeVerbose)
+ HLTWarning("I-RAWHISTOMAKERCOMPONENT: Data block is not of type fgkChannelDataType");
+ else
+ HLTDebug("I-RAWHISTOMAKERCOMPONENT: Data block is not of type fgkChannelDataType");
continue;
}
specification |= iter->fSpecification;
tmpChannelData = reinterpret_cast<AliHLTCaloChannelDataHeaderStruct*>(iter->fPtr);
- //HLTWarning (" channel number %d",tmpChannelData->fNChannels);
+ if (fBeVerbose)
+ HLTWarning ("I-RAWHISTOMAKERCOMPONENT: channel number %d",tmpChannelData->fNChannels);
- ret = fRawHistoMakerPtr->MakeHisto(tmpChannelData, iter, outputPtr, size);
+ ret = fRawHistoMakerPtr->MakeHisto(tmpChannelData, iter, outputPtr, size, fBeVerbose);
//if(ret == -1)
//{
fLocalEventCount++;
- // fRawHistoMakerPtr->Reset();
-
TFile rootHistFile(fRootFileName,"recreate");
fRawHistoMakerPtr->GetHistograms()->Write();
if (fLocalEventCount%fPushFraction == 0) {
- cout << "pushback done at " << fLocalEventCount << " events " << endl;
+
+ if (fBeVerbose)
+ cout << "I-RAWHISTOMAKERCOMPONENT: pushback done at " << fLocalEventCount << " events " << endl;
PushBack(fRawHistoMakerPtr->GetHistograms(), kAliHLTDataTypeTObjArray | kAliHLTDataOriginEMCAL , specification);
}
for(int i = 0; i < argc; i++)
{
if(!strcmp("-roothistofilename", argv[i]))
- {
fRootFileName = argv[i+1];
- }
if(!strcmp("-pushfraction", argv[i]))
- {
fPushFraction = atoi(argv[i+1]);
- }
+
+ if(!strcmp("-beverbose", argv[i]))
+ fBeVerbose = atoi(argv[i+1]);
+
}
- // cout << rootFileName << endl;
+ if (fBeVerbose)
+ cout << "I-RAWHISTOMAKERCOMPONENT: local root file name is: " << fRootFileName << endl;
return 0;
}