36 class ConfigurationFrame;
105 HeaderDef(Char_t skip =
'#', Bool_t is_record =
false, std::string rid =
"", std::string srid =
"", Short_t version = -1) : fSkipLine(skip), fWithRecord(is_record), fRID(rid), fSRID(srid), fVersion(version)
118 HeaderDef fHeaderDef;
123 Header(Short_t version, Short_t pversion, std::string streamopt =
"Init") : fVersion(version), fPreviousVersion(pversion), fStreamOption(streamopt)
128 Short_t fPreviousVersion;
130 std::string fStreamOption;
136 std::list< DotConf * > fListOfDotConf;
141 std::string fLastModif;
143 std::string fComment;
167 Bool_t
AddRecord(std::ostream &,
char t =
'b');
174 { fHeader.fVersion = v; }
177 { fHeaderDef.fVersion = v; }
221 DotConf(
const Char_t *rid,
const Char_t *srid =
"", Bool_t is_record =
true);
228 {
return fHeaderDef.fWithRecord; }
231 { fHeaderDef.fWithRecord = is_record; }
234 { fComment = comment ; }
236 {
return fComment.data(); }
239 {
return fLastModif.data(); }
243 {
return fHeaderDef.fVersion;}
246 virtual void Reset(
const Char_t *opt =
"");
249 virtual void SetRID(
const Char_t *rid,
const Char_t *srid =
"")
250 { fHeaderDef.fRID = rid; fHeaderDef.fSRID = srid; }
253 {
return fHeaderDef.fRID.data(); }
256 {
return fHeaderDef.fSRID.data(); }
259 {
return fHeader.fVersion; }
263 {
return fHeader.fStreamOption.data(); }
265 { fHeader.fStreamOption = opt; }
276 fListOfDotConf.clear();
278 fListOfDotConf.remove(aconf);
291 virtual Bool_t
DoConfigure(std::istream &, Bool_t allow_init);
307 virtual Bool_t
Configure(
const char *name,
const char *option =
"in", Bool_t allow_init =
true);
void SetVersion(Short_t v)
DotConf : Utility for class configuration from ascii file or Configuration frames.
const Char_t * GetComment() const
std::string BeginOfRecord()
string that gives a start of record for this object
virtual Short_t GetVersion() const
to get the curent version of this object
virtual const Char_t * GetSRID() const
to get the record id
void SetLastModif()
set in last modif string the current date.
Short_t GetMaxVersion() const
this class could managed moddification of the versionned part up to MaxVersion : should be set in the...
A configuration frame is just an encapsulation of a string.
virtual const Char_t * GetRID() const
to get the record id
void SetComment(const Char_t *comment)
Bool_t IsEndOfRecord(const std::string &)
Return true if this string is an end of record.
virtual void Reset(const Char_t *opt="")
Reset : all values are set to default.
std::string EndOfRecord()
string that gives an end of record for this object
virtual void SetRID(const Char_t *rid, const Char_t *srid="")
to set the record id
virtual void RemoveConf(DotConf *aconf=0x0)
virtual Bool_t Configure(ConfigurationFrame *, const char *option="in", Bool_t allow_init=false)
configuration from/to a configuration frame : extact string from the frame and call DoConfigure ...
const Char_t * GetLastModif() const
LogMessage fLog
the log messenger ... to know the object hae been properly intitialised/modified
virtual Bool_t DoConfigure(std::istream &, Bool_t allow_init)
configure this from an input stream
Bool_t IsBeginOfRecord(const std::string &, Bool_t allow_init)
Return true if this string is a begin of record and call Reset if Init is found.
to set informations about the ADF configuration
Base class for a Log message.
header file for ADFLogMessage.cpp
virtual Bool_t ProcessLine(const std::string &)
a helper template to do clones : it requires a default constructor. then it uses the Configure facili...
void SetMaxVersion(Short_t v)
virtual const Char_t * GetStreamOption() const
get/set option
virtual void AddConf(DotConf *)
add a conf object to this. The added objects are not owned by this so not deleted.
virtual void SetStreamOption(const Char_t *opt)
Bool_t IsWithRecord() const
to know if this is intialisased with a stream composed of records.
Bool_t AddRecord(std::ostream &, char t= 'b')
Add a begin or end of record, return true if done.
void SetWithRecord(Bool_t is_record=true)
to change the behavior