#include "AliMonitorTrend.h"
#include "AliTPCParam.h"
#include <TFolder.h>
-#ifdef ALI_HLT
#include <stdlib.h>
#include "AliL3MemHandler.h"
#include "AliL3SpacePointData.h"
#include "AliL3Track.h"
#include "AliL3Transform.h"
#include "AliL3Vertex.h"
-#endif
//_____________________________________________________________________________
AliMonitorHLT::AliMonitorHLT(AliTPCParam* param)
{
// fill the HLT monitor histogrms
-#ifndef ALI_HLT
- Warning("FillHistos", "the code was compiled without HLT support");
-
-#else
AliL3MemHandler clusterHandler[36];
AliL3SpacePointData *clusters[36];
for (Int_t iSector = 0; iSector < fParam->GetNInnerSector(); iSector++) {
delete tracks;
memHandler.CloseBinaryInput();
-#endif
}
#include "AliMonitorTrend.h"
#include "AliTPCParam.h"
#include <TFolder.h>
-#ifdef ALI_HLT
#include <stdlib.h>
#include <AliL3MemHandler.h>
#include <AliL3TrackArray.h>
#include <AliL3SpacePointData.h>
#include <AliL3HoughTrack.h>
#include <AliL3Transform.h>
-#endif
//_____________________________________________________________________________
AliMonitorHLTHough::AliMonitorHLTHough(AliTPCParam* param)
{
// fill the HLT Hough transform monitor histograms
-#ifndef ALI_HLT
- Warning("FillHistos", "the code was compiled without HLT support");
-
-#else
AliL3MemHandler clusterHandler[36][6];
AliL3SpacePointData *clusters[36][6];
for (Int_t iSector = 0; iSector < fParam->GetNInnerSector(); iSector++) {
delete tracks;
memHandler.CloseBinaryInput();
-
-#endif
}
#include "AliESD.h"
#include "AliITS.h"
-#include "AliITSLoader.h"
#include "AliITSclustererV2.h"
#include "AliITStrackerV2.h"
#include "AliLoader.h"
#include "AliTPCtrackerMI.h"
#include "AliV0vertexer.h"
-#ifdef ALI_HLT
+#include <AliL3StandardIncludes.h>
+#include <AliL3MemHandler.h>
#include <AliL3ClusterFitter.h>
-#include <AliL3DDLDataFileHandler.h>
#include <AliL3Fitter.h>
#include <AliL3Hough.h>
#include <AliL3HoughBaseTransformer.h>
-#include <AliL3HoughMaxFinder.h>
#include <AliL3StandardIncludes.h>
#include <AliL3Track.h>
#include <AliL3TrackArray.h>
#include <AliL3Transform.h>
#include <AliL3Vertex.h>
#include <AliLevel3.h>
-#endif
ClassImp(AliMonitorProcess)
const char* alienHost,
#endif
const char* alienDir,
- const char* fileNameGalice)
+ const char* selection,
+ const char* fileNameGalice):
+ fSelection(selection),
+ fGrid(NULL),
+ fAlienDir(alienDir),
+ fRunLoader(NULL),
+ fTPCParam(NULL),
+ fITSgeom(NULL),
+ fLogicalFileName(""),
+ fFileName(""),
+ fHLT(NULL),
+ fHLTHough(NULL),
+
+ fRunNumber(0),
+ fSubRunNumber(0),
+ fNEvents(0),
+ fNEventsMin(1),
+ fWriteHistoList(kFALSE),
+
+ fTopFolder(NULL),
+ fMonitors(),
+ fFile(NULL),
+ fTree(NULL),
+
+ fServerSocket(NULL),
+ fSockets(),
+ fDisplaySocket(NULL),
+
+ fStatus(kStopped),
+ fStopping(kFALSE),
+
+ fInterruptHandler(NULL)
{
// initialize the monitoring process and the monitor histograms
+ fSelection = selection;
+
#if ROOT_VERSION_CODE <= 199169 // 3.10/01
fGrid = TGrid::Connect("alien", gSystem->Getenv("USER"));
#else
}
#if ROOT_VERSION_CODE <= 199169 // 3.10/01
fGrid->cd(alienDir);
-#else
- fAlienDir = alienDir;
#endif
- fLogicalFileName = "";
- fFileName = "";
fRunLoader = AliRunLoader::Open(fileNameGalice);
if (!fRunLoader) Fatal("AliMonitorProcess",
fITSgeom = its->GetITSgeom();
if (!fITSgeom) Fatal("AliMonitorProcess", "could not load ITS geometry");
-#ifdef ALI_HLT
-// Init TPC parameters for HLT
+ // Init TPC parameters for HLT
Bool_t isinit=AliL3Transform::Init(const_cast<char*>(fileNameGalice),kTRUE);
if(!isinit){
- cerr << "Could not create transform settings, please check log for error messages!" << endl;
- return;
+ Fatal("AliMonitorProcess", "Could not create transform settings, please check log for error messages!");
}
-#endif
-
- fRunNumber = 0;
- fSubRunNumber = 0;
- fNEvents = 0;
- fNEventsMin = 1;
- fWriteHistoList = kFALSE;
fTopFolder = new TFolder("Monitor", "monitor histograms");
fTopFolder->SetOwner(kTRUE);
- fMonitors.Add(new AliMonitorTPC(fTPCParam));
- fMonitors.Add(new AliMonitorITS(fITSgeom));
- fMonitors.Add(new AliMonitorV0s);
-#ifdef ALI_HLT
- fMonitors.Add(new AliMonitorHLT(fTPCParam));
- fMonitors.Add(new AliMonitorHLTHough(fTPCParam));
-#endif
+ if (IsSelected("TPC")) fMonitors.Add(new AliMonitorTPC(fTPCParam));
+ if (IsSelected("ITS")) fMonitors.Add(new AliMonitorITS(fITSgeom));
+ if (IsSelected("V0s")) fMonitors.Add(new AliMonitorV0s);
+ if (IsSelected("HLTConfMap")) fMonitors.Add(new AliMonitorHLT(fTPCParam));
+ if (IsSelected("HLTHough")) fMonitors.Add(new AliMonitorHLTHough(fTPCParam));
for (Int_t iMonitor = 0; iMonitor < fMonitors.GetEntriesFast(); iMonitor++) {
((AliMonitor*) fMonitors[iMonitor])->CreateHistos(fTopFolder);
fServerSocket = new TServerSocket(fgkPort, kTRUE);
fServerSocket->SetOption(kNoBlock, 1);
- fDisplaySocket = NULL;
CheckForConnections();
-#ifdef ALI_HLT
- fHLT = NULL;
-#endif
-
- SetStatus(kStopped);
- fStopping = kFALSE;
fInterruptHandler = new AliMonitorInterruptHandler(this);
gSystem->AddSignalHandler(fInterruptHandler);
//_____________________________________________________________________________
AliMonitorProcess::AliMonitorProcess(const AliMonitorProcess& process) :
- TObject(process)
+ TObject(process),
+
+ fSelection(""),
+ fGrid(NULL),
+ fAlienDir(""),
+ fRunLoader(NULL),
+ fTPCParam(NULL),
+ fITSgeom(NULL),
+ fLogicalFileName(""),
+ fFileName(""),
+ fHLT(NULL),
+ fHLTHough(NULL),
+
+ fRunNumber(0),
+ fSubRunNumber(0),
+ fNEvents(0),
+ fNEventsMin(1),
+ fWriteHistoList(kFALSE),
+
+ fTopFolder(NULL),
+ fMonitors(),
+ fFile(NULL),
+ fTree(NULL),
+
+ fServerSocket(NULL),
+ fSockets(),
+ fDisplaySocket(NULL),
+
+ fStatus(kStopped),
+ fStopping(kFALSE),
+
+ fInterruptHandler(NULL)
+
{
Fatal("AliMonitorProcess", "copy constructor not implemented");
}
delete fFile;
gSystem->Unlink("monitor_tree.root");
-#ifdef ALI_HLT
delete fHLT;
delete fHLTHough;
-#endif
gSystem->RemoveSignalHandler(fInterruptHandler);
delete fInterruptHandler;
if (nEvents <= 0) return kFALSE;
Info("ProcessFile", "found %d event(s) in file %s",
nEvents, fFileName.Data());
-#ifdef ALI_HLT
- CreateHLT(fFileName);
- CreateHLTHough(fFileName);
-#endif
+ if (IsSelected("HLTConfMap")) CreateHLT(fFileName);
+ if (IsSelected("HLTHough")) CreateHLTHough(fFileName);
// loop over the events
for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
rawReader.GetEventId()[0], rawReader.GetEventId()[1]);
AliESD esd;
- CheckForConnections();
- if (!ReconstructTPC(&rawReader, &esd)) return kFALSE;
- if (fStopping) break;
- CheckForConnections();
- if (!ReconstructITS(&rawReader, &esd)) return kFALSE;
- if (fStopping) break;
- CheckForConnections();
- if (!ReconstructV0s(&esd)) return kFALSE;
- if (fStopping) break;
- CheckForConnections();
- if (!ReconstructHLT(iEvent)) return kFALSE;
- if (fStopping) break;
- CheckForConnections();
- if (!ReconstructHLTHough(iEvent)) return kFALSE;
- if (fStopping) break;
+ if (IsSelected("TPC")) {
+ CheckForConnections();
+ if (!ReconstructTPC(&rawReader, &esd)) return kFALSE;
+ if (fStopping) break;
+ }
+ if (IsSelected("ITS")) {
+ CheckForConnections();
+ if (!ReconstructITS(&rawReader, &esd)) return kFALSE;
+ if (fStopping) break;
+ }
+ if (IsSelected("V0s")) {
+ CheckForConnections();
+ if (!ReconstructV0s(&esd)) return kFALSE;
+ if (fStopping) break;
+ }
+ if (IsSelected("HLTConfMap")) {
+ CheckForConnections();
+ if (!ReconstructHLT(iEvent)) return kFALSE;
+ if (fStopping) break;
+ }
+ if (IsSelected("HLTHough")) {
+ CheckForConnections();
+ if (!ReconstructHLTHough(iEvent)) return kFALSE;
+ if (fStopping) break;
+ }
if (fDisplaySocket) fDisplaySocket->Send("new event");
if (fStopping) break;
}
-#ifdef ALI_HLT
- delete fHLT;
- fHLT = NULL;
-#endif
+ if (fHLT) {
+ delete fHLT;
+ fHLT = NULL;
+ }
+ if (fHLTHough) {
+ delete fHLTHough;
+ fHLTHough = NULL;
+ }
return kTRUE;
}
}
//_____________________________________________________________________________
-#ifdef ALI_HLT
void AliMonitorProcess::CreateHLT(const char* fileName)
{
// fHLTHough->GetMaxFinder()->SetThreshold(14000);
}
-#endif
//_____________________________________________________________________________
-Bool_t AliMonitorProcess::ReconstructHLT(
-#ifdef ALI_HLT
- Int_t iEvent
-#else
- Int_t /* iEvent */
-#endif
-)
+Bool_t AliMonitorProcess::ReconstructHLT(Int_t iEvent)
{
// run the HLT cluster and track finder
SetStatus(kRecHLT);
-#ifndef ALI_HLT
- Warning("ReconstructHLT", "the code was compiled without HLT support");
- return kTRUE;
-
-#else
gSystem->Exec("rm -rf hlt");
gSystem->MakeDirectory("hlt");
if (!fHLT) return kFALSE;
sprintf(command, "rename tracks_%d tracks hlt/*.raw", iEvent);
gSystem->Exec(command);
return kTRUE;
-#endif
}
//_____________________________________________________________________________
-Bool_t AliMonitorProcess::ReconstructHLTHough(
-#ifdef ALI_HLT
- Int_t iEvent
-#else
- Int_t /* iEvent */
-#endif
-)
+Bool_t AliMonitorProcess::ReconstructHLTHough(Int_t iEvent)
{
// run the HLT Hough transformer
SetStatus(kRecHLT);
-#ifndef ALI_HLT
- Warning("ReconstructHLTHough", "the code was compiled without HLT support");
- return kTRUE;
-
-#else
gSystem->Exec("rm -rf hlt/hough");
gSystem->MakeDirectory("hlt/hough");
gSystem->Exec("rm -rf hlt/fitter");
sprintf(command, "rename points_%d points hlt/fitter/*.raw", iEvent);
gSystem->Exec(command);
return kTRUE;
-#endif
}
//_____________________________________________________________________________
class AliRawReader;
class AliRunLoader;
class AliTPCParam;
-#ifdef ALI_HLT
class AliLevel3;
class AliL3Hough;
-#endif
class AliMonitorProcess : public TObject {
public:
AliMonitorProcess(const char* alienHost,
const char* alienDir,
+ const char* selection = "ALL",
const char* fileNameGalice = "galice.root");
- AliMonitorProcess(const AliMonitorProcess& process);
- AliMonitorProcess& operator = (const AliMonitorProcess& process);
virtual ~AliMonitorProcess();
static const char* GetRevision();
static Int_t GetPort() {return fgkPort;};
private:
+ AliMonitorProcess(const AliMonitorProcess& process);
+ AliMonitorProcess& operator = (const AliMonitorProcess& process);
+
Bool_t CheckForNewFile();
Bool_t ProcessFile();
Int_t GetNumberOfEvents(const char* fileName) const;
Bool_t ReconstructTPC(AliRawReader* rawReader, AliESD* esd);
Bool_t ReconstructITS(AliRawReader* rawReader, AliESD* esd);
Bool_t ReconstructV0s(AliESD* esd);
-#ifdef ALI_HLT
void CreateHLT(const char* fileName);
void CreateHLTHough(const char* fileName);
-#endif
Bool_t ReconstructHLT(Int_t iEvent);
Bool_t ReconstructHLTHough(Int_t iEvent);
void CheckForConnections();
void BroadcastHistos(TSocket* toSocket = NULL);
void SetStatus(EStatus status);
+ Bool_t IsSelected(const char* name) const
+ {return (fSelection.Contains(name) || fSelection.Contains("ALL"));}
static const Int_t fgkPort; // port number for client connections
+ TString fSelection; // selection of monitor histograms
TGrid* fGrid; // pointer to AliEn
TString fAlienDir; // name of alien directory
AliRunLoader* fRunLoader; // the current run loader
AliITSgeom* fITSgeom; // ITS parameters
TString fLogicalFileName; // logical AliEn file name
TString fFileName; // physical file name
-#ifdef ALI_HLT
AliLevel3* fHLT; // the HLT tracker
AliL3Hough* fHLTHough; // the HLT hough transformer
-#endif
UInt_t fRunNumber; // current run number
UInt_t fSubRunNumber; // current part (=resets per run)
+#-*- Mode: Makefile -*-
+# $Id$
+
+include HLT/hlt.conf
+
+EDEFINE := ${HLTDEFS}
+PACKCXXFLAGS := ${HLTCXXFLAGS}
+PACKCFLAGS := ${HLTCLFAGS}
+PACKDCXXFLAGS:= ${HLTDCXXFLAGS}
+
SRCS:=monitorCheck.cxx
-EINCLUDE+=TPC CONTAINERS ITS RAW
+EINCLUDE+=TPC CONTAINERS ITS RAW HLT/src HLT/hough HLT/comp
ifdef DATE_ROOT
+#-*- Mode: Makefile -*-
+# $Id$
+
+include HLT/hlt.conf
+
+EDEFINE := ${HLTDEFS}
+PACKCXXFLAGS := ${HLTCXXFLAGS}
+PACKCFLAGS := ${HLTCLFAGS}
+PACKDCXXFLAGS:= ${HLTDCXXFLAGS}
+
SRCS:=monitorGDC.cxx
-EINCLUDE+=TPC CONTAINERS ITS RAW
+EINCLUDE+=TPC CONTAINERS ITS RAW HLT/src HLT/hough HLT/comp
ifdef DATE_ROOT
ELIBSDIR:=${DATE_MONITOR_DIR}/${DATE_SYS}
-ELIBS:= STEER RAW monitor shift pythia6 pdf microcern
+ELIBS:=STEER RAW TPC CONTAINERS AliL3Src AliL3Misc AliL3Hough AliL3Comp monitor shift pythia6 pdf microcern
EINCLUDE+= ${DATE_COMMON_DEFS} ${DATE_MONITOR_DIR}
-ifeq ($(ALIHLT_USEPACKAGE),ALIROOT)
-ELIBSDIR+=${ALIHLT_LIBDIR}
-ELIBS+= AliL3Src AliL3Misc AliL3Hough AliL3Comp TPC CONTAINERS
-endif
-
else
ELIBS:= pythia6 pdf microcern
+#-*- Mode: Makefile -*-
+# $Id$
+
+include HLT/hlt.conf
+
+EDEFINE := ${HLTDEFS}
+PACKCXXFLAGS := ${HLTCXXFLAGS}
+PACKCFLAGS := ${HLTCLFAGS}
+PACKDCXXFLAGS:= ${HLTDCXXFLAGS}
+
SRCS:= AliMonitorPlot.cxx AliMonitorHisto.cxx AliMonitorTrend.cxx \
AliMonitor.cxx \
AliMonitorTPC.cxx AliMonitorITS.cxx AliMonitorV0s.cxx \
DHDR:= MONITORLinkDef.h
-EINCLUDE:=TPC CONTAINERS ITS RAW
+EINCLUDE:=TPC CONTAINERS ITS RAW HLT/src HLT/hough HLT/comp
#include <TSystem.h>
#include <TError.h>
#include <TInterpreter.h>
+#include "AliRun.h"
#include "MONITOR/AliMonitorProcess.h"
#include "MONITOR/AliMonitorControl.h"
#endif
void monitor(Bool_t batchMode = kFALSE,
+ const char* selection = "ALL",
const char* alienHost = "alien://aliens7.cern.ch:15000/?direct",
const char* alienDir = "/alice_mdc/DC")
{
// load libraries
- if (gSystem->Getenv("ALIHLT_USEPACKAGE") &&
- (strcmp(gSystem->Getenv("ALIHLT_USEPACKAGE"), "ALIROOT") == 0)) {
- if (!gROOT->GetClass("AliLevel3")) {
- gSystem->Load("libAliL3Src.so");
- gSystem->Load("libAliL3Misc.so");
- gSystem->Load("libAliL3Hough.so");
- gSystem->Load("libAliL3Comp.so");
- }
+ if (!gROOT->GetClass("AliLevel3")) {
+ gSystem->Load("libAliL3Src.so");
+ gSystem->Load("libAliL3Misc.so");
+ gSystem->Load("libAliL3Hough.so");
+ gSystem->Load("libAliL3Comp.so");
}
if (!gROOT->GetClass("AliMonitorProcess")) {
gSystem->Load("libMONITOR.so");
}
- // make sure galice.root and compression tables are there
+ // make sure galice.root is there
if (!gSystem->Which(".", "galice.root")) {
gAlice->Init("$ALICE_ROOT/MONITOR/galice.C");
gAlice->GetRunLoader()->Write();
delete gAlice->GetRunLoader();
}
- if (!gSystem->Which(".", "Table0.dat")) {
- gSystem->Exec("cp $ALICE_ROOT/RAW/Table*.dat .");
- }
// start the monitoring
- AliMonitorProcess *process = new AliMonitorProcess(alienHost, alienDir);
+ AliMonitorProcess *process = new AliMonitorProcess(alienHost, alienDir,
+ selection);
if (batchMode) {
process->Run();
delete process;
#include "AliRawReaderDate.h"
#include "event.h"
#include "monitor.h"
-#ifdef ALI_HLT
#include <AliLevel3.h>
#include <AliL3Transform.h>
#include <AliL3MemHandler.h>
#include <AliL3TrackArray.h>
#endif
-#endif
//_____________________________________________________________________________
gROOT->SetBatch();
// open a log file
-#ifdef ALI_HLT
FILE* file = fopen("monitorGDC.log", "w");
-#else
- FILE* file = NULL;
-#endif
TDatime time;
// get data from a file or online from this node
status = monitorDeclareMp("GDC physics monitoring");
if (status) ::Fatal("monitorDeclareMp", monitorDecodeError(status));
-#ifdef ALI_HLT
// initialize HLT transformations
if (!AliL3Transform::Init("./", kFALSE)) {
::Fatal("AliL3Transform::Init", "HLT initialization failed");
}
-#endif
// create the signal handler
AliGDCInterruptHandler* handler = new AliGDCInterruptHandler;
continue;
}
-#ifdef ALI_HLT
+ // read run, event, detector, DDL numbers and data size
AliRawReaderDate rawReader(ptr);
+ time.Set();
+ printf("\n%s\n", time.AsString());
+ printf("run: %d event: %d %d\n", rawReader.GetRunNumber(),
+ rawReader.GetEventId()[0], rawReader.GetEventId()[1]);
+ while (rawReader.ReadHeader()) {
+ printf(" detector: %d DDL: %d size: %d\n",
+ rawReader.GetDetectorID(), rawReader.GetDDLID(),
+ rawReader.GetDataSize());
+ }
+
if ((rawReader.GetAttributes()[0] & 0x02) != 0) {
Int_t errorCode = rawReader.CheckData();
}
}
-#else
- // read run, event, detector, DDL numbers and data size
- AliRawReaderDate rawReader(ptr);
- time.Set();
- printf("\n%s\n", time.AsString());
- printf("run: %d event: %d %d\n", rawReader.GetRunNumber(),
- rawReader.GetEventId()[0], rawReader.GetEventId()[1]);
- while (rawReader.ReadMiniHeader()) {
- printf(" detector: %d DDL: %d size: %d\n",
- rawReader.GetDetectorID(), rawReader.GetDDLID(),
- rawReader.GetDataSize());
- }
-
-#endif
-
gSystem->Sleep(100); // sleep for 0.1 second
free(ptr);