Commit 8fe4c3ea authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

new file: JugReco/ACTSLogger.h

	new file:   tests/options/example_calodigi.py
	new file:   tests/options/testLogger.py
parent 91098855
#ifndef RECTRACKER_ACTSLOGGER_H
#define RECTRACKER_ACTSLOGGER_H
#include "Acts/Utilities/Logger.hpp"
#include "GaudiKernel/ServiceHandle.h"
#include "GaudiKernel/IMessageSvc.h"
#include "GaudiKernel/MsgStream.h"
class GaudiFilterPolicy : public Acts::Logging::OutputFilterPolicy {
public:
GaudiFilterPolicy(IMessageSvc* owner) : m_messenger(owner), m_currentLevel(m_messenger.currentLevel()) {}
bool doPrint(const Acts::Logging::Level& lvl) const {
MSG::Level l = MSG::VERBOSE;
switch (lvl) {
case Acts::Logging::VERBOSE:
l = MSG::VERBOSE;
break;
case Acts::Logging::DEBUG:
l = MSG::DEBUG;
break;
case Acts::Logging::INFO:
l = MSG::INFO;
break;
case Acts::Logging::WARNING:
l = MSG::WARNING;
break;
case Acts::Logging::ERROR:
l = MSG::ERROR;
break;
case Acts::Logging::FATAL:
l = MSG::FATAL;
break;
}
MSG::Level cl = m_currentLevel;
return l < cl;
}
private:
MsgStream m_messenger;
MSG::Level m_currentLevel;
};
class GaudiPrintPolicy : public Acts::Logging::OutputPrintPolicy {
public:
GaudiPrintPolicy(IMessageSvc* owner) : m_messenger(owner) {}
void flush(const Acts::Logging::Level& lvl, const std::ostringstream& input) {
MSG::Level l = MSG::VERBOSE;
switch (lvl) {
case Acts::Logging::VERBOSE:
l = MSG::VERBOSE;
break;
case Acts::Logging::DEBUG:
l = MSG::DEBUG;
break;
case Acts::Logging::INFO:
l = MSG::INFO;
break;
case Acts::Logging::WARNING:
l = MSG::WARNING;
break;
case Acts::Logging::ERROR:
l = MSG::ERROR;
break;
case Acts::Logging::FATAL:
l = MSG::FATAL;
break;
}
m_messenger << l << input.str() << endmsg;
}
private:
MsgStream m_messenger;
};
#endif // RECTRACKER_ACTSLOGGER_H
from Gaudi.Configuration import *
from Configurables import ApplicationMgr, EICDataSvc, PodioOutput
podioevent = EICDataSvc("EventDataSvc", inputs=["derp.root"], OutputLevel=DEBUG)
from Configurables import PodioInput
from Configurables import Jug__Digi__ExampleCaloDigi as ExampleCaloDigi
from Configurables import Jug__Digi__UFSDTrackerDigi as UFSDTrackerDigi
podioinput = PodioInput("PodioReader", collections=["mcparticles","LAEC_PrShHits","LAEC_ShHits","FAEC_PrShHits","FAEC_ShHits","GEMTrackerHits"], OutputLevel=DEBUG)
caldigi = ExampleCaloDigi(inputHitCollection="FAEC_ShHits",outputHitCollection="RawFAECShowerHits")
ufsd_digi = UFSDTrackerDigi(inputHitCollection="GEMTrackerHits",outputHitCollection="GEMRawHits")
out = PodioOutput("out", filename="test.root")
out.outputCommands = ["keep *"]
ApplicationMgr(
TopAlg = [podioinput, caldigi,ufsd_digi, out
],
EvtSel = 'NONE',
EvtMax = 5,
ExtSvc = [podioevent],
OutputLevel=DEBUG
)
from Gaudi.Configuration import *
from Configurables import ApplicationMgr
from Configurables import TestACTSLogger
logtest = TestACTSLogger()
# auto trackFindingCfg = Options::readTrackFindingConfig(vm);
#trackFindingCfg.inputSourceLinks = hitSmearingCfg.outputSourceLinks;
#trackFindingCfg.inputInitialTrackParameters =
# particleSmearingCfg.outputTrackParameters;
#trackFindingCfg.outputTrajectories = "trajectories";
#trackFindingCfg.findTracks = TrackFindingAlgorithm::makeTrackFinderFunction(
# trackingGeometry, magneticField, logLevel);
#sequencer.addAlgorithm(
# std::make_shared<TrackFindingAlgorithm>(trackFindingCfg, logLevel));
ApplicationMgr(EvtSel='NONE',
EvtMax=1,
TopAlg=[logtest],
ExtSvc=[],
OutputLevel=DEBUG)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment