fEventCount(0),
fWriteInterval(1000)
{
+ //comment
}
AliHLTPHOSTreeMakerComponent::~AliHLTPHOSTreeMakerComponent()
{
+ //comment
}
int
AliHLTPHOSTreeMakerComponent::Deinit()
{
+ //comment
cout << "Printing file...";
char filename [50];
sprintf(filename, "%s/run%d_digitTree_%d.root", fDirectory, fRunNb,(fEventCount/fWriteInterval));
const char*
AliHLTPHOSTreeMakerComponent::GetComponentID()
{
+ //comment
return "PhosTreeMaker";
}
void
AliHLTPHOSTreeMakerComponent::GetInputDataTypes(vector<AliHLTComponentDataType>& list)
{
+ //comment
//Get datatypes for input
const AliHLTComponentDataType* pType=fgkInputDataTypes;
while (pType->fID!=0) {
AliHLTComponentDataType
AliHLTPHOSTreeMakerComponent::GetOutputDataType()
{
+ //comment
return AliHLTPHOSDefinitions::fgkAliHLTRootTreeDataType;
}
void
AliHLTPHOSTreeMakerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier)
{
+ //comment
constBase = 30;
inputMultiplier = 1;
}
int
AliHLTPHOSTreeMakerComponent::DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
- AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size,
- std::vector<AliHLTComponentBlockData>& outputBlocks)
+ AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* /*outputPtr*/, AliHLTUInt32_t& /*size*/, //TODO: I think size should be set to zero when returning from this method if not data was written to the output buffer.
+ std::vector<AliHLTComponentBlockData>& /*outputBlocks*/)
{
//Do event
if ( iter->fDataType == AliHLTPHOSDefinitions::fgkAliHLTDigitDataType )
{
- digitEvent == true;
+ digitEvent = true;
nDigits = fTreeMakerPtr->MakeDigitArray ( reinterpret_cast<AliHLTPHOSDigitContainerDataStruct*> ( iter->fPtr ), totalDigits );
totalDigits += nDigits;
//cout << totalDigits << endl;
int
AliHLTPHOSTreeMakerComponent::DoInit ( int argc, const char** argv )
{
-
+ //comment
fTreeMakerPtr = new AliHLTPHOSTreeMaker();
fDigitTreePtr = new TTree ( "digitTree", "Digits tree" );
fDirectory = new char[50];
fTreeMakerPtr->SetDigitTree(fDigitTreePtr);
fstream runNbFile;
- Int_t newRunNb;
+ //Int_t newRunNb;
runNbFile.open("/opt/HLT-public/rundir/runNumber.txt");
runNbFile >> fRunNb;
runNbFile.close();
AliHLTComponent*
AliHLTPHOSTreeMakerComponent::Spawn()
{
+ //comment
return new AliHLTPHOSTreeMakerComponent();
}
void
AliHLTPHOSTreeMakerComponent::Write()
{
+ //comment
cout << "Writing file...";
- char filename [50];
+ char filename [256];
sprintf(filename, "%s/run%d_digitTree_%d.root", fDirectory, fRunNb,(fEventCount/fWriteInterval - 1));
TFile *outfile = new TFile(filename,"recreate");
fDigitTreePtr->Write();
void
AliHLTPHOSTreeMakerComponent::ResetTrees()
{
+ //comment
delete fDigitTreePtr;
fDigitTreePtr = new TTree("digitTree", "Digits tree");
fTreeMakerPtr->SetDigitTree(fDigitTreePtr);