Commit a19e47b6 authored by Stezowski Olivier's avatar Stezowski Olivier
Browse files

allow changing conf file name

git-svn-id: svn+ssh://anonsvn.in2p3.fr/agata/gammaware/trunk@2266 c3abf467-7ff2-0310-b516-c5fb849bdde0
parent f8d4fbbe
......@@ -33,6 +33,8 @@
using namespace ADF;
std::string BasicAFC::gConfigurationFilename = "BasicAFC.conf";
BasicAFC::BasicAFC(Int_t id) :
NarvalConsumer(),
fEndOfFrames(aMByte,ConfAgent::kWrite),
......@@ -151,7 +153,7 @@ UInt_t BasicAFC::ProcessBlock (ADF::FrameBlock &in)
if(fMyID >= 0) {
std::cout << std::setw(2) << fMyID;
std::cout << std::left << std::setw(24) << "-BasicAFC:" << std::right
std::cout << std::left << std::setw(24) << "-" << gConfigurationFilename << ":" << std::right
<< " " << std::setw(5) << nevtsOut-nevtsIn
<< " evts (" << std::setw(8) << in.GetSize() << ")"
<< " Tot = " << std::setw(8) << nevtsOut
......@@ -173,7 +175,7 @@ void BasicAFC::process_initialise (UInt_t *error_code)
GetFrameIO().Register(fVertex);
// read an input file to get the base filename and the path
std::string conffile = GetConfPath() + "BasicAFC.conf";
std::string conffile = GetConfPath() + gConfigurationFilename;
std::ifstream filein(conffile.data());
if ( filein.is_open() == true ) {
......
......@@ -36,7 +36,11 @@
/*!
*/
class BasicAFC : public ADF::NarvalConsumer
{
{
public:
//! static way to change the name of the configuration file
static std::string gConfigurationFilename;
private:
//! destination of the frames
ADF::FileBlock fEndOfFrames;
......
Markdown is supported
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