- TString origin = "";
-
- // -- Check for Connection
- if ( !fReader || ! IsConnected() ) {
- AliError( Form("Not connected yet.") );
- return origin;
- }
-
- // -- Check block index
- if ( ( ndx ) >= (Int_t) fNBlks ) {
- AliError( Form("Block index %d out of range.", ndx ) );
- return origin;
- }
-
- // -- Get origin
- union{
- UInt_t data;
- Char_t array[4];
- } reverseOrigin;
-
- reverseOrigin.data = (UInt_t) fReader->GetBlockDataOrigin( ndx );
-
- // -- Reverse the order
- for (Int_t ii = 3; ii >= 0; ii-- )
- if ( reverseOrigin.array[ii] != ' ')
- origin.Append( reverseOrigin.array[ii] );
-
- return origin;
-}
-
-//##################################################################################
-TString AliEveHOMERManager:: GetBlkType( Int_t ndx ) {
- // see header file for class documentation
-
- TString type = "";
-
- // -- Check for Connection
- if ( !fReader || ! IsConnected() ) {
- AliError( Form("Not connected yet.") );
- return type;
- }
-
- // -- Check blockk index
- if ( ( ndx ) >= (Int_t) fNBlks ) {
- AliError( Form("Block index %d out of range.", ndx ) );
- return type;
- }
-
- // -- Get type
- union{
- ULong64_t data;
- Char_t array[8];
- } reverseType;
-
- reverseType.data = (ULong64_t) fReader->GetBlockDataType( ndx );
-
- // -- Reverse the order
- for (Int_t ii = 7; ii >= 0; ii-- )
- if ( reverseType.array[ii] != ' ')
- type.Append( reverseType.array[ii] );
-
- return type;
-}
-
-
-//##################################################################################
-ULong_t AliEveHOMERManager:: GetBlkSpecification( Int_t ndx ) {
- // see header file for class documentation
-
- ULong_t spec = 0;
-
-
- // -- Check for Connection
- if ( !fReader || ! IsConnected() ) {
- AliError( Form("Not connected yet.") );
- return spec;
- }
-
- // -- Check blockk index
- if ( ( ndx ) >= (Int_t) fNBlks ) {
- AliError( Form("Block index %d out of range.", ndx ) );
- return spec;
- }
-
- spec = (ULong_t) fReader->GetBlockDataSpec( ndx );
-
- return spec;
-}
-
-//##################################################################################
-Bool_t AliEveHOMERManager::CheckIfRequested( AliHLTHOMERBlockDesc * block ) {
- // see header file for class documentation
-
- Bool_t requested = kFALSE;
-
- AliHLTHOMERSourceDesc * source= NULL;
-
- // -- Read all sources and check if they should be read out
- TIter next( fSourceList );
- while ( ( source = (AliHLTHOMERSourceDesc*)next() ) ) {
-
- if ( ! source->IsSelected() )
- continue;
-
- if ( source->GetDetector().CompareTo( block->GetDetector() ) )
- continue;
-
- if ( source->GetDataType().CompareTo( block->GetDataType() ) )
- continue;
-
- if ( ! block->HasSubDetectorRange() ) {
-
- if ( source->GetSubDetector().Atoi() != block->GetSubDetector().Atoi() )
- continue;
-
- if ( ! block->HasSubSubDetectorRange() ) {
-
- // if ( source->GetSubSubDetector().Atoi() != block->GetSubSubDetector().Atoi() )
- // continue;
-
- } // if ( ! block->HasSubSubDetectorRange ) {
- } // if ( ! block->HasSubDetectorRange ) {
-
- requested = kTRUE;
-
- } // while ( ( source = (AliHLTHOMERSourceDesc*)next() ) ) {
-
- if ( requested) {
- AliInfo( Form("Block requested : %s - %s : %s/%s -> %s ", block->GetDetector().Data(), block->GetDataType().Data(),
- block->GetSubDetector().Data(), block->GetSubSubDetector().Data(), block->GetClassName().Data() ) );
- }
- else
- AliInfo( Form("Block NOT requested : %s - %s : %s/%s -> %s ", block->GetDetector().Data(), block->GetDataType().Data(), block->GetSubDetector().Data(), block->GetSubSubDetector().Data(), block->GetClassName().Data() ) );
-
- return requested;
-}
-
-//##################################################################################
-void AliEveHOMERManager::TestSelect() {
- // see header file for class documentation
-
- for (Int_t ii =0; ii < fSourceList->GetEntries() ; ii++ ) {
- if ( (ii%2) == 0 )
- ((AliHLTHOMERSourceDesc*) fSourceList->At(ii))->Select();
- }
-}
-
-//##################################################################################
-void AliEveHOMERManager::TestSelectClass( TString objectName ) {
- // see header file for class documentation
-
- TList* srcList = GetSourceList();
-
- AliHLTHOMERSourceDesc *desc = 0;
-
- TIter next(srcList);
-
- while ( ( desc = (AliHLTHOMERSourceDesc*)next() ) ) {
- if ( ! desc->GetClassName().CompareTo( objectName ) )
- desc->Select();
- }
-}
-
-//##################################################################################
-void AliEveHOMERManager::SelectRawTPC() {
- // see header file for class documentation
-
- TList* srcList = GetSourceList();
-
- AliHLTHOMERSourceDesc *desc = 0;
-
- TIter next(srcList);
-
- while ( ( desc = (AliHLTHOMERSourceDesc*)next() ) ) {
- if ( ! desc->GetDataType().CompareTo( "DDL_RAW" ) ) {
- desc->Select();
- }
- }
-}
-
-//##################################################################################
-void AliEveHOMERManager::SelectClusterTPC() {
- // see header file for class documentation
-
- TList* srcList = GetSourceList();
-
- AliHLTHOMERSourceDesc *desc = 0;
-
- TIter next(srcList);
-
- while ( ( desc = (AliHLTHOMERSourceDesc*)next() ) ) {
- if ( ! desc->GetDataType().CompareTo( "CLUSTERS" ) ) {
- desc->Select();
- }
- }
-}
-
-//##################################################################################
-void AliEveHOMERManager::SelectESDTPC() {
- // see header file for class documentation
-
- TList* srcList = GetSourceList();
-
- AliHLTHOMERSourceDesc *desc = 0;
-
- TIter next(srcList);
-
- while ( ( desc = (AliHLTHOMERSourceDesc*)next() ) ) {
- if ( ! desc->GetDataType().CompareTo( "ESD_TREE" ) ) {
- desc->Select();
- }
- }
-}
-//##################################################################################
-void AliEveHOMERManager::DumpTPCCalib(TString objectName, Bool_t dumpToFile) {
- // see header file for class documentation
-
- if ( fTPCPre != NULL )
- delete fTPCPre;
-
- fTPCPre = new AliTPCPreprocessorOnline();
-
- TList* blockList = GetBlockList();
-
- AliHLTHOMERBlockDesc *desc = 0;
-
- TIter next(blockList);
-
- while ( ( desc = (AliHLTHOMERBlockDesc*)next() ) ) {
- if ( ! desc->IsTObject() )
- continue;
-
- Int_t sectorTPC = 0;
-
- if ( desc->GetSubSubDetector().Atoi() <= 1 ) {
- sectorTPC = desc->GetSubDetector().Atoi();
- }
- else {
- sectorTPC = 36 + desc->GetSubDetector().Atoi();
- }
-
- if ( ! objectName.CompareTo( desc->GetClassName() ) ){
-
- //
- // AliTPCCalibPedestal
- //
-
- if ( ! objectName.CompareTo( "AliTPCCalibPedestal" ) ) {
- AliTPCCalROC* calROC = NULL;
-
- AliTPCCalibPedestal * cal = (AliTPCCalibPedestal*) desc->GetTObject();
- if ( cal == NULL ) {
- cout << "error 1" << endl;
- continue;
- }
-
- cal->Analyse();
-
- calROC = cal->GetCalRocRMS(sectorTPC);
- if ( calROC == NULL ) {
- cout << "error 2" << endl;
- continue;
- }
-
- calROC->SetName(Form("RMS_ROC%d", sectorTPC));
- fTPCPre->AddComponent((TObject*) calROC );
-
- calROC = cal->GetCalRocPedestal(sectorTPC);
- if ( calROC == NULL ) {
- cout << "error 3" << endl;
- continue;
- }
-
-
- calROC->SetName(Form("Pedestal_ROC%d", sectorTPC));
- cout << "added" << endl;
- fTPCPre->AddComponent((TObject*) calROC );
- }
-
- //
- // AliTPCCalibPulser
- //
- /*
- else if ( ! objectName.CompareTo( "AliTPCCalibPulser" ) ) {
- AliTPCCalROC* calROC = NULL;
-
- AliTPCCalibPulser * cal = (AliTPCCalibPulser*) desc->GetTObject();
-
- cal->Analyse();
-
- calROC = cal->GetCalRocT0(sectorTPC);
- calROC->SetName(Form("T0_ROC%d", sectorTPC));
- fTPCPre->AddComponent((TObject*) calROC );
-
- calROC = cal->GetCalRocQ(sectorTPC);
- calROC->SetName(Form("Q_ROC%d", sectorTPC));
- fTPCPre->AddComponent((TObject*) calROC );
-
- calROC = cal->GetCalRocRMS(sectorTPC);
- calROC->SetName(Form("RMS_ROC%d", sectorTPC));
- fTPCPre->AddComponent((TObject*) calROC );
-
- calROC = cal->GetCalRocOutliers(sectorTPC);
- calROC->SetName(Form("Outliers_ROC%d", sectorTPC));
- fTPCPre->AddComponent((TObject*) calROC );
- }
-
-*/
- //
- // AliTPCCalibCE
- //
- /*
- else if ( ! objectName.CompareTo( "AliTPCCalibCE" ) ) {
- AliTPCCalROC* calROC = NULL;
-
- AliTPCCalibPulser * cal = (AliTPCCalibPulser*) desc->GetTObject();
-
- cal->Analyse();
-
- calROC = cal->GetCalRocT0(sectorTPC);
- calROC->SetName(Form("T0_ROC%d", sectorTPC));
- fTPCPre->AddComponent((TObject*) calROC );
-
- calROC = cal->GetCalRocQ(sectorTPC);
- calROC->SetName(Form("Q_ROC%d", sectorTPC));
- fTPCPre->AddComponent((TObject*) calROC );
-
- calROC = cal->GetCalRocRMS(sectorTPC);
- calROC->SetName(Form("RMS_ROC%d", sectorTPC));
- fTPCPre->AddComponent((TObject*) calROC );
-
- calROC = cal->GetCalRocOutliers(sectorTPC);
- calROC->SetName(Form("Outliers_ROC%d", sectorTPC));
- fTPCPre->AddComponent((TObject*) calROC );
- }
- */
- } // if ( ! objectName.CompareTo( desc->GetClassName() ) ) {
-
- } // while ( ( desc = (AliHLTHOMERBlockDesc*)next() ) ) {
-
- if ( dumpToFile ) {
-
- fTPCPre->DumpToFile("pedestals.root");
- cout << "DUMP" << endl;
- }
-
-