Skip to content

Commit

Permalink
Merge branch 'eflumerf/FormatAndWhitespace' into rrivera/commentForma…
Browse files Browse the repository at this point in the history
…tForDoxygen2
  • Loading branch information
rrivera747 committed Feb 17, 2025
2 parents b65f4cc + ae800ae commit 69c553a
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 51 deletions.
2 changes: 1 addition & 1 deletion otsdaq/ConfigurationInterface/ConfigurationHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void ConfigurationHandler::readXML(TableBase& table, TableVersion version)
parser->setDoSchema(
false); // RAR set to false to get rid of "error reading primary document *.xsd"
// uses if true:
// rootElement->setAttribute(CONVERT_TO_XML("xsi:noNamespaceSchemaLocation"),CONVERT_TO_XML("TableBase.xsd"));
// rootElement->setAttribute(CONVERT_TO_XML("xsi:noNamespaceSchemaLocation"),CONVERT_TO_XML("TableBase.xsd"));
parser->useCachedGrammarInParse(false);
DOMTreeErrorReporter* errorHandler = new DOMTreeErrorReporter();
parser->setErrorHandler(errorHandler);
Expand Down
2 changes: 1 addition & 1 deletion otsdaq/ConfigurationInterface/ConfigurationManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3267,7 +3267,7 @@ ConfigurationManager::getActiveGroupAliases(void)
"" /* pathToActiveGroupsFile */,
ConfigurationManager::LoadGroupType::
ONLY_BACKBONE_TYPE); // make sure the active configuration backbone is
// loaded from disk (i.e. the latest activated at the ConfigurationGUISupervisor)!
// loaded from disk (i.e. the latest activated at the ConfigurationGUISupervisor)!

std::map<std::string /*groupAlias*/,
std::pair<std::string /*groupName*/, TableGroupKey>>
Expand Down
8 changes: 4 additions & 4 deletions otsdaq/ConfigurationInterface/ConfigurationTree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,9 @@ std::vector<std::string> ConfigurationTree::getFixedChoices(void) const
/// getComment
const std::string& ConfigurationTree::getComment(void) const
{
return getNode(TableViewColumnInfo::COL_NAME_COMMENT).getValueAsString() == ""?
TableViewColumnInfo::DATATYPE_COMMENT_DEFAULT :
getNode(TableViewColumnInfo::COL_NAME_COMMENT).getValueAsString();
return getNode(TableViewColumnInfo::COL_NAME_COMMENT).getValueAsString() == ""
? TableViewColumnInfo::DATATYPE_COMMENT_DEFAULT
: getNode(TableViewColumnInfo::COL_NAME_COMMENT).getValueAsString();
} // end getComment()

//==============================================================================
Expand Down Expand Up @@ -2394,7 +2394,7 @@ bool ConfigurationTree::passFilterMap(

if(skip)
break; // no match for this field, so stop checking and skip this
// record
// record
}
return !skip;
} //end passFilterMap()
Expand Down
4 changes: 2 additions & 2 deletions otsdaq/ConfigurationInterface/Database_configInterface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ try
result = ifc.findGlobalConfigurations(filterString + "*"); // GConfig will return
// all GConfig* with
// filesystem db.. for
// mongodb would require
// reg expr
// mongodb would require
// reg expr
auto end = std::chrono::high_resolution_clock::now();
auto duration =
std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
Expand Down
4 changes: 2 additions & 2 deletions otsdaq/CoreSupervisors/ConfigurationSupervisorBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@ try
bool groupAliasChange = false;
bool tableAliasChange = false;

{ // check group aliases ... a la
{ // check group aliases ... a la
// ConfigurationGUISupervisor::handleSetGroupAliasInBackboneXML

TableBase* table =
Expand Down Expand Up @@ -2145,4 +2145,4 @@ catch(...)
}
__COUT__ << "\n" << ss.str() << __E__;
xmlOut.addTextElementToData("Error", ss.str());
} // end recursiveCopyTreeUIDNode
} // end recursiveCopyTreeUIDNode
13 changes: 7 additions & 6 deletions otsdaq/CoreSupervisors/CoreSupervisorBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ CoreSupervisorBase::CoreSupervisorBase(xdaq::ApplicationStub* stub)
"TRACESupervisorRequest",
XDAQ_NS_URI);

__SUP_COUT__ << "Constructed. getpid()=" << getpid() <<
" gettid()=" << gettid() << __E__;
__SUP_COUT__ << "Constructed. getpid()=" << getpid() << " gettid()=" << gettid()
<< __E__;
} // end constructor

//==============================================================================
Expand Down Expand Up @@ -406,8 +406,9 @@ xoap::MessageReference CoreSupervisorBase::applicationStatusRequest(
{
// send back status and progress parameters

__SUP_COUTVS__(20, std::to_string(getpid()) + ":" + std::to_string(gettid()) + ":" +
theStateMachine_.getCurrentStateName());
__SUP_COUTVS__(20,
std::to_string(getpid()) + ":" + std::to_string(gettid()) + ":" +
theStateMachine_.getCurrentStateName());

const std::string& err = theStateMachine_.getErrorMessage();
// std::string status = err == "" ? (theStateMachine_.isInTransition() ? theStateMachine_.getProvenanceStateName() : theStateMachine_.getCurrentStateName())
Expand Down Expand Up @@ -486,7 +487,6 @@ std::string CoreSupervisorBase::getStatusProgressDetail(void)
}
*/


if(!theStateMachine_.isInTransition() &&
(theStateMachine_.getCurrentStateName() ==
RunControlStateMachine::HALTED_STATE_NAME ||
Expand All @@ -497,7 +497,8 @@ std::string CoreSupervisorBase::getStatusProgressDetail(void)
StringMacros::encodeURIComponent(StringMacros::getTimeDurationString(
CorePropertySupervisorBase::getSupervisorUptime())) +
", Time-in-state: " +
StringMacros::encodeURIComponent(StringMacros::getTimeDurationString(theStateMachine_.getTimeInState()));
StringMacros::encodeURIComponent(StringMacros::getTimeDurationString(
theStateMachine_.getTimeInState()));
return detail;
}

Expand Down
2 changes: 1 addition & 1 deletion otsdaq/DataManager/RawDataSaverConsumerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RawDataSaverConsumerBase : public DataConsumer, public Configurable
virtual void writeHeader(void) { ; }
virtual void writeFooter(void) { ; }
virtual void writePacketHeader(const std::string& /*data*/)
{ // unsigned char quadWordsCount = (data.length()-2)/8; outFile_.write(
{ // unsigned char quadWordsCount = (data.length()-2)/8; outFile_.write(
// (char*)&quadWordsCount, 1);
;
}
Expand Down
4 changes: 2 additions & 2 deletions otsdaq/FECore/FEVInterfacesManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ void FEVInterfacesManager::startMacroMultiDimensional(const std::string& request
} // end long loop

} // end update current value to next value for all
// dimensional parameters
// dimensional parameters
}
__GEN_COUT__ << "Completed dimension[" << dimension
<< "] number of iterations := "
Expand Down Expand Up @@ -1807,7 +1807,7 @@ void FEVInterfacesManager::startFEMacroMultiDimensional(
<< __E__;
} // end double loop
} // end update current value to next value for all
// dimensional parameters
// dimensional parameters
}
__GEN_COUT__ << "Completed dimension[" << dimension
<< "] number of iterations := "
Expand Down
47 changes: 25 additions & 22 deletions otsdaq/GatewaySupervisor/GatewaySupervisor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ GatewaySupervisor::GatewaySupervisor(xdaq::ApplicationStub* s)

init();

__SUP_COUT__ << "Constructed. getpid()=" << getpid() <<
" gettid()=" << gettid() << __E__;
__SUP_COUT__ << "Constructed. getpid()=" << getpid() << " gettid()=" << gettid()
<< __E__;
} // end constructor

//==============================================================================
Expand Down Expand Up @@ -217,7 +217,6 @@ void GatewaySupervisor::init(void)
loadRemoteGatewaySettings(remoteGatewayApps_);
}


// start state changer UDP listener thread
std::thread(
[](GatewaySupervisor* s) { GatewaySupervisor::StateChangerWorkLoop(s); },
Expand Down Expand Up @@ -389,13 +388,15 @@ void GatewaySupervisor::AppStatusWorkLoop(GatewaySupervisor* theSupervisor)
.getCurrentTransitionName(
theSupervisor->stateMachineLastCommandInput_)
: (std::string("Uptime: ") +
StringMacros::encodeURIComponent(StringMacros::getTimeDurationString(
theSupervisor->CorePropertySupervisorBase::
getSupervisorUptime())) +
StringMacros::encodeURIComponent(
StringMacros::getTimeDurationString(
theSupervisor->CorePropertySupervisorBase::
getSupervisorUptime())) +
", Time-in-state: " +
StringMacros::encodeURIComponent(StringMacros::getTimeDurationString(
theSupervisor->theStateMachine_
.getTimeInState()))));
StringMacros::encodeURIComponent(
StringMacros::getTimeDurationString(
theSupervisor->theStateMachine_
.getTimeInState()))));
// make sure broadcast message status is not being updated
std::lock_guard<std::mutex> lock(
theSupervisor->broadcastCommandStatusUpdateMutex_);
Expand Down Expand Up @@ -1166,12 +1167,10 @@ void GatewaySupervisor::AppStatusWorkLoop(GatewaySupervisor* theSupervisor)

xoap::MessageReference tempMessage =
SOAPUtilities::makeSOAPMessageReference("ApplicationStatusRequest");

__COUT_TYPE__(TLVL_DEBUG + 39)
<< __COUT_HDR__ << "tempMessage... "
<< SOAPUtilities::translate(tempMessage) << std::endl;



try
{
Expand Down Expand Up @@ -1207,7 +1206,7 @@ void GatewaySupervisor::AppStatusWorkLoop(GatewaySupervisor* theSupervisor)
if(progress.empty())
progress = "100";

detail = parameters.getValue("Detail");
detail = parameters.getValue("Detail");
if(appInfo.isTypeConsoleSupervisor())
{
//parse detail
Expand Down Expand Up @@ -1245,7 +1244,7 @@ void GatewaySupervisor::AppStatusWorkLoop(GatewaySupervisor* theSupervisor)
__COUTVS__(36, closeTimePos);
theSupervisor->lastConsoleErr_ =
parseDetail[3].substr(closeTimePos + 2);
size_t openTimePos = parseDetail[3].find('(');
size_t openTimePos = parseDetail[3].find('(');
__COUTVS__(36, openTimePos);
theSupervisor->lastConsoleErrTime_ = parseDetail[3].substr(
openTimePos, closeTimePos - openTimePos + 1);
Expand Down Expand Up @@ -1378,15 +1377,18 @@ void GatewaySupervisor::AppStatusWorkLoop(GatewaySupervisor* theSupervisor)
try
{
theSupervisor->runControlMessageHandler(
SOAPUtilities::makeSOAPMessageReference(
RunControlStateMachine::ERROR_TRANSITION_NAME));
SOAPUtilities::makeSOAPMessageReference(
RunControlStateMachine::
ERROR_TRANSITION_NAME));
}
catch(...)
{
} //ignore any errors
}
else
__COUT__ << "Ignoring that Console type supervisor crashed." << __E__;
else
__COUT__
<< "Ignoring that Console type supervisor crashed."
<< __E__;

break; //only send one Error, then restart status loop
}
Expand All @@ -1401,17 +1403,18 @@ void GatewaySupervisor::AppStatusWorkLoop(GatewaySupervisor* theSupervisor)
} //one more try to printout extra info
catch(const std::runtime_error& e)
{
__COUT_ERR__ << "Exception of type runtime_error message: " << e.what();
__COUT_ERR__ << "Exception of type runtime_error message: "
<< e.what();
}
catch(const std::exception& e)
{
__COUT_ERR__ << "Exception of type " <<
typeid(e).name() << " message: " << e.what();
__COUT_ERR__ << "Exception of type " << typeid(e).name()
<< " message: " << e.what();
}
catch(...)
{
}

status = SupervisorInfo::APP_STATUS_UNKNOWN;
progress = "0";
detail = "Unknown SOAP Message Error";
Expand Down
2 changes: 1 addition & 1 deletion otsdaq/SupervisorInfo/AllSupervisorInfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ AllSupervisorInfo::getOrderedSupervisorDescriptors(
orderedByPriority
[XDAQContextTable::XDAQApplication::DEFAULT_PRIORITY]
.push_back(app.id_); // if no priority, then default to
// XDAQContextTable::XDAQApplication::DEFAULT_PRIORITY
// XDAQContextTable::XDAQApplication::DEFAULT_PRIORITY
else // take value, and do not allow DEFAULT value of 0 -> force to
// XDAQContextTable::XDAQApplication::DEFAULT_PRIORITY
orderedByPriority[it->second ? it->second
Expand Down
2 changes: 1 addition & 1 deletion otsdaq/TableCore/TableBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ bool TableBase::isActive() { return activeTableView_ ? true : false; }
bool TableBase::setActiveView(TableVersion version)
{
if(!isStored(version))
{ // we don't call else load for the user, because the table manager would lose
{ // we don't call else load for the user, because the table manager would lose
// track.. (I think?)
// so load new versions for the first time through the table manager only. (I
// think??)
Expand Down
2 changes: 1 addition & 1 deletion otsdaq/TableCore/TableView.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ unsigned int TableView::getColPriority(void) const
void TableView::addRowToGroup(const unsigned int& row,
const unsigned int& col,
const std::string& groupID) //,
// const std::string &colDefault)
// const std::string &colDefault)
{
if(isEntryInGroupCol(row, col, groupID))
{
Expand Down
8 changes: 4 additions & 4 deletions otsdaq/TablePlugins/ARTDAQTableBase/ARTDAQTableBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2337,8 +2337,8 @@ const ARTDAQTableBase::ARTDAQInfo& ARTDAQTableBase::getARTDAQSystem(
for(auto& artdaqNode : it->second)
{
// check skip set
if(skipSet.find(StringMacros::encodeURIComponent(artdaqNode.label)) !=
skipSet.end())
if(skipSet.find(StringMacros::encodeURIComponent(artdaqNode.label)) !=
skipSet.end())
continue;

__COUT__ << "\t\t"
Expand Down Expand Up @@ -2661,7 +2661,7 @@ const ARTDAQTableBase::ARTDAQInfo& ARTDAQTableBase::getARTDAQSystem(
{
if(i < hyphenLo)
hyphenLo = i; // start hyphen
//else continue hyphen
//else continue hyphen
}
else // new comma
{
Expand Down Expand Up @@ -2769,7 +2769,7 @@ const ARTDAQTableBase::ARTDAQInfo& ARTDAQTableBase::getARTDAQSystem(
{
if(i < hyphenLo)
hyphenLo = i; // start hyphen
//else continue hyphen
//else continue hyphen
}
else // new comma
{
Expand Down
2 changes: 1 addition & 1 deletion otsdaq/TablePlugins/IterateTableImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ std::vector<IterateTable::Command> IterateTable::getPlanCommands(
commands.back().targets_.back().UID_ = targetNode.getUIDAsString();
}
}
else if(commandSpecificFields[i].first == // treat FE and Macro the same
else if(commandSpecificFields[i].first == // treat FE and Macro the same
IterateTable::commandExecuteMacroParams_.MacroParameterLink_)
{
// get Macro parameters, place them in params_
Expand Down
4 changes: 2 additions & 2 deletions otsdaq/WebUsersUtilities/WebUsers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3526,8 +3526,8 @@ void WebUsers::addSystemMessage(const std::vector<std::string>& targetUsers,
(subject == "" ? "" : (subject + ": ")) + message);

// Note: do not printout message, because if it was a Console trigger, it will fire repeatedly
std::cout << __COUT_HDR_FL__
<< "addSystemMessage() fullMessage: " << fullMessage << __E__;
std::cout << __COUT_HDR_FL__ << "addSystemMessage() fullMessage: " << fullMessage
<< __E__;
__COUTV__(StringMacros::vectorToString(targetUsers));

std::set<std::string> targetEmails;
Expand Down

0 comments on commit 69c553a

Please sign in to comment.